# encoding:utf-8
import urllib
import urllib2


def send_short_msg(tpl_id='908659', tpl_value="#code#=123456", mobile_number='18672196610'):
    url = 'http://yunpian.com/v1/sms/tpl_send.json'
    values = {'apikey': '1d3f6b7def6125c47d56583116fd938b',
              'mobile': mobile_number,
              'tpl_id': tpl_id,
              'tpl_value': tpl_value,
              }
    print values
    data = urllib.urlencode(values)
    req = urllib2.Request(url, data)
    response = urllib2.urlopen(req)
    return response.read()
